﻿@using System.Data;
@using GatewayServer.Common;

@using UtilsBase;
@using UtilsBase;
@{
    ViewBag.PageTitle = "洪峰智能";

    Layout = "~/Views/Shared/PageTemplate.cshtml";
}

<script>
    $(document).ready(function () {

        if ($("#p_guid").val() == "") {
            document.getElementById("butbackproduct").style.display = "none";
        }
    });
    function changeStatus(dguid) {
        $.post("changeStatus", { "flag": Math.random(), guid: dguid }, function (result) {
            var jsonresult = (result);
            if (jsonresult.respCode == "200") {
                window.location.reload();
            }
            else {
                alert(jsonresult.respMsg);
                return;
            }
        });
    }
</script>

<div id="saper-container">
    <form id="searchForm" name="searchForm" action="list?p_guid=@(Context.Request.Query["p_guid"])" method="post">
        <input type="hidden" name="p_guid" id="p_guid" value="@(Context.Request.Query["p_guid"])" />
        <div id="saper-hd"></div>
        <div id="saper-bd">
            <div class="subfiled clearfix">
                <h2>语言列表</h2>
            </div>
            <div class="subfiled-content">
                <div class="search-box clearfix">

                   

                    <div class="kv-item clearfix">
                        <label>内容：</label>
                        <div class="kv-item-content">
                            <input type="text" id="name" value="@Model.name" name="name" placeholder="名称" />
                        </div>
                    </div>
                    <a href="javascript:;" id="but_Search" name="but_Search" class="sapar-btn sapar-btn-recom query-btn">查询</a>
                    <a href="javascript:location.reload();" id="but_refresh" name="but_Search" class="sapar-btn sapar-btn-recom query-btn">刷新</a>

                    <a href="javascript:window.location.href ='/product/list';" id="butbackproduct" name="butbackproduct" class="sapar-btn sapar-btn-recom query-btn">返回</a>

                </div>
                <!--表格开始-->
                <div class="table">
                    <!--表格操作-->
                    <div class="table-operate ue-clear">
                        <a href="edit?p_guid=@(Context.Request.Query["p_guid"])" class="add" id="adda">添加</a>
                        
                    </div>
                    <!--表格具体内容-->
                    <div class="table-box">
                        <table>
                            <thead>
                                <tr>
                                    @*                                    <th style="width:50px;"><input name="allbox" id="allbox" type="checkbox" value="" onclick="selectall()" /> 全选</th>
                                    *@
                                    <th>序号</th>
                                    <th>编号</th>
                                    <th>内容</th>
                                    <th>种类</th>
                                    <th>添加时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>

                                @{
                                    int rowcount = 0; string result = "";
                                }
                                @foreach (DataRow item in (ViewData["DataList"] as DataTable).Rows)
                                {
                                    rowcount = rowcount + 1;
                                    <tr @Html.Raw(rowcount % 2 == 0 ? "style='background-color:#EFF6FA';" : "") id="tr_@rowcount" onclick="selectTr('@rowcount','15','@item["c_guid"]')">

                                     
                                        <td>@(rowcount + ((int)ViewBag.PageIndex - 1) * (int)ViewBag.PageSize)</td>
                                        <td>@item["c_code"]</td>
                                        <td>@item["c_name"]</td>
                                          <td>@item["lname"]</td>

                                        
                                        <td>@(UtilsDateTime.getFormatTime(item["c_addtime"].ToString()))</td>
                                        <td>
                                            <a href="edit?order=upd&edit_guid=@(item["c_guid"])&p_guid=@(Context.Request.Query["p_guid"])">修改</a>
                                        </td>
                                    </tr>
                                }
                                @if (rowcount < 1)
                                {
                                    <tr class="no-data"><td colspan="5" style="text-align:center">暂时没有数据</td></tr>
                                }
                            </tbody>
                        </table>
                        @Html.Raw(new GatewayServer.Common.PageHelper().GetPageHtml((int)ViewBag.RecordCount, (int)ViewBag.PageIndex, (int)ViewBag.PageCount))
                    </div>
                </div><!--表格结束-->
            </div>
        </div>
        <div id="saper-ft"></div>
    </form>
</div>
